package com.htn.common.core.base;

import lombok.Getter;
import lombok.Setter;

import java.util.List;


/**
 * @author hongfei
 */
@Getter
@Setter
public class TableResultResponse<T> extends BaseResponse {
    private TableData<T> data;

    public TableResultResponse(long total, List<T> rows) {
        this.data = new TableData<>(total, rows);
    }

    public TableResultResponse() {
        this.data = new TableData<>();
    }


    @Getter
    @Setter
    class TableData<TT> {
        private long total;
        private List<TT> rows;

        public TableData(long total, List<TT> rows) {
            this.total = total;
            this.rows = rows;
        }

        public TableData() {
        }

    }
}
